Skip to content

Test object_hook and pickleability of some JSON components#154155

Merged
encukou merged 2 commits into
python:mainfrom
dslavicek:improve-json-test-coverage2
Jul 21, 2026
Merged

Test object_hook and pickleability of some JSON components#154155
encukou merged 2 commits into
python:mainfrom
dslavicek:improve-json-test-coverage2

Conversation

@dslavicek

Copy link
Copy Markdown
Contributor
  • add test for object hook in JSONDecoder
  • add test of pickleability of JsonDecodeError

@@ -0,0 +1,14 @@
import json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a new file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@encukou advised me not to put this in the file with decoder tests. I saw no existing dedicated file for testing pickling of things from the json module. Where do you propose placing the test?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see. I guess, it's fine then (I wasn't aware of the rationale so it was surprsing).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, all other JSON tests run twice, with speedups (_json) enabled/disabled, but this doesn't sit well with pickle.

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Sprint Jul 19, 2026
@bedevere-app

This comment was marked as off-topic.

@picnixz
picnixz dismissed their stale review July 19, 2026 15:03

,misclick

@picnixz picnixz changed the title add tests for json module Test object_hook and pickleability of json decoders Jul 19, 2026
@picnixz picnixz changed the title Test object_hook and pickleability of json decoders Test object_hook and pickleability of some JSON components Jul 19, 2026
@encukou encukou added needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 21, 2026
@encukou
encukou merged commit d333e5a into python:main Jul 21, 2026
68 of 70 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Sprint Jul 21, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @dslavicek for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jul 21, 2026

Copy link
Copy Markdown

GH-154374 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 21, 2026
@bedevere-app

bedevere-app Bot commented Jul 21, 2026

Copy link
Copy Markdown

GH-154375 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 21, 2026
tomasr8 pushed a commit that referenced this pull request Jul 22, 2026
…H-154155) (#154375)

Test `object_hook` and pickleability of some JSON components (GH-154155)
(cherry picked from commit d333e5a)

Co-authored-by: David <slavicek.david29@gmail.com>
tomasr8 pushed a commit that referenced this pull request Jul 22, 2026
…H-154155) (#154374)

Test `object_hook` and pickleability of some JSON components (GH-154155)
(cherry picked from commit d333e5a)

Co-authored-by: David <slavicek.david29@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants